<template>
    <div>
        <template v-for = "item in menuList">
        <el-submenu index= item.path :key="item.path" v-if = "item.children && item.children.length > 0">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title" v-if="!flag">{{ item.menuName }}</span>
        </template>
        <el-menu-item-group>
          <!-- <el-menu-item index="/order">商品管理</el-menu-item> -->
          <MenuList :menuList="item.children"></MenuList>
        </el-menu-item-group>
      </el-submenu>

      <el-menu-item :index="item.path" :key="item.menuName" v-else>
        <template slot="title">
          <i class="el-icon-setting"></i>
          <span slot="title" v-if="!flag">{{ item.menuName }}</span>
        </template>
      </el-menu-item>
      </template>
   </div>
</template>
<script>
export default {
  name: 'MenuList',
  props: ['menuList', 'flag'],
  data () {
    return {
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
  }
}
</script>
<style lang="scss" scoped>

</style>
